﻿using System;
using System.Text;
using System.Resources;

static class BsonLoc
{
	private readonly static ResourceManager JsonSerialization = global::Sencha.Serialization.Sencha_Serialization.ResourceManager;
	private readonly static ResourceManager BsonSerialization = global::Sencha.Serialization.Bson.Sencha_Serialization_Bson.ResourceManager;

	internal static string GetString(string name, params object[] args)
	{
		string locString = BsonSerialization.GetString(name) ?? JsonSerialization.GetString(name) ?? name;
		if (args != null && args.Length > 0)
			return String.Format(locString, (object[])args);
		else
			return locString;
	}
	internal static string GetErrorString(string message, params object[] args)
	{
		return GetString(message, args);
	}
}
